@echo off
chcp 65001 >nul
echo ========================================
echo    ITS Quick Service Restart
echo ========================================
echo.
echo Choose service to restart:
echo 1. Backend only
echo 2. Frontend only  
echo 3. Both Backend and Frontend
echo 4. Full rebuild (slower)
echo.
set /p choice="Enter your choice (1-4): "

cd /d "%~dp0"

if "%choice%"=="1" (
    echo Restarting backend service...
    docker-compose restart backend
    echo Backend restarted!
) else if "%choice%"=="2" (
    echo Restarting frontend service...
    docker-compose restart frontend
    echo Frontend restarted!
) else if "%choice%"=="3" (
    echo Restarting backend and frontend...
    docker-compose restart backend frontend
    echo Services restarted!
) else if "%choice%"=="4" (
    echo Performing full rebuild...
    docker-compose down
    docker-compose up -d --build
    echo Full rebuild completed!
) else (
    echo Invalid choice. Exiting...
    goto :end
)

echo.
echo Service status:
docker-compose ps

:end
echo.
pause